This page last changed on May 16, 2006 by miles.

Q: I get NoSuchMethodErrors when running GeoServer on a server with ColdFusion

If you are running ColdFusion and Geoserver under JRun, there is a small possiblility that you will encounter this error. The error is often generated not because a method is missing as the name of the error suggests, but because there is a duplicate class in your classpath.

Coldfusion, for some reason, modifies JRun's default JVM configuration. All JRun's servers (even though they are running as separate processes) use the same configuration by default. Coldfusion adds its own library path as a JNI library path to this 'default' configuration.

That means any libraries that coldfusion uses, geoserver will use by default too (as will any other server you run under JRun), even though they are running under separate processes.

To rectify, either coldfusion or geoserver should be set to use a custom JVM configuration.

The details of how to make a JRun server start using a custom configuration can be found at http://www.adobe.com/go/tn_18206/.

You can just copy the default JVM configuration and remove any references to coldfusion, then apply it as a custom configuration to geoserver. I'll explain the whole process now.

  1. Make a duplicate of your jvm.config file, found in
    {jrun.rootdir}/bin. Call it anything you like - I'll call it 'jvm.config_geoserver' - leave it in the{jrun.rootdir}/bin directory with the original.
  2. Open jvm.config_geoserver in a text editor.
  3. Make the following changes:
    java.ext.dirs={jre.home}/lib/ext
    java.library.path=
    system.path.first=false
    java.user.dir={application.home}/../lib
    java.class.path={application.home}/servers/lib,{application.home}/lib
  4. Save and close the file.
  5. Open a command prompt/shell, and navigate to {application.home}/bin (On Windows this is usually c:\JRun4\bin).
  6. If you already have Geoserver set up to start as it's own service, then you have to remove the service so we can make a new one (skip this step otherwise):
    • > jrunsvc -remove "Your Geoserver Service Name"
  7. Create a new service using the configuration file we just made:
    • > jrunsvc -install geoserver "JRun Geoserver" -config jvm.config_geoserver
  8. Start the service as you would normally start a service on your OS. For Windows XP/2000/2003:
    • Right click on my computer and choose 'Manage'
    • Select 'Services and Applications -> Services' from the menu
    • Find your JRun Geoserver service
    • Right click it and choose start
  9. If anything goes wrong, read the document linked to above on setting up JRun services, and check you have specified the correct settings in your config file.

That's it. Geoserver will now start as a windows service using the configuration file you just made, and it won't be affected by coldfusion any longer.

Note: This has only been tested to work on Windows XP and Windows 2000 Server. If you have success using it on another OS, please post a comment.

Document generated by Confluence on Jan 16, 2008 23:27